package com.groupbuying.currency.producer.controller;

import com.groupbuying.currency.producer.service.CurrencyPayService;
import com.groupbuying.currency.producer.utils.apiresult.ApiResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 积分使用
 */
 
@RestController
@RequestMapping("/pay")
public class CurrencyPayController {
	@Autowired
	private CurrencyPayService currencyPayService;

	/**
	 * 发起积分支付
	 **/

	@PostMapping("/checkpay")
	public ApiResult createCurrencyCustomer(@RequestParam Map<String, Object> params) throws Exception {
		return currencyPayService.doPayWithCurrency(params);
    }

	
}
